package com.pro.service.imple;

import com.pro.mapper.JsBeforeUserMapper;
import com.pro.pojo.*;
import com.pro.service.JsBeforeUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @Title: 用户service实现类
* @author 许振杰
* @date 2022/1/23 0023 17:02
* @version V1.0
*/
@Service
public class JsBeforeUserServiceImple implements JsBeforeUserService {
    @Autowired
    private JsBeforeUserMapper beforeUserMapper;

    /**
    * @Title: 获取全部用户
    * @author Administrator
    * @date 2022/1/23 0023 19:06
    * @version V1.0
    */
    @Override
    public List<JsBeforeUser> getBeforeUser(String account, String nickname, String createDate) {
        return beforeUserMapper.getBeforeUser(account, nickname, createDate);
    }

    /**
    * @Title: 用户列表的高级检索
    * @author 许振杰
    * @date 2022/1/23 0023 20:38
    * @version V1.0
    */
    @Override
    public List<JsBeforeUser> advancedRetrieval(JsBeforeUser beforeUser) {
        return beforeUserMapper.advancedRetrieval(beforeUser);
    }

    /**
    * @Title: 修改用户信息
    * @author 许振杰
    * @date 2022/1/23 0023 22:02
    * @version V1.0
    */
    @Override
    public boolean editBeforeUserByUserId(JsBeforeUser beforeUser) {
        return beforeUserMapper.editBeforeUserByUserId(beforeUser);
    }

    /**
    * @Title: 修改用户状态
    * @author Administrator
    * @date 2022/1/23 0023 22:03
    * @version V1.0
    */
    @Override
    public boolean editBeforeUserStatus(Integer userId, Integer status) {
        return beforeUserMapper.editBeforeUserStatus(userId, status);
    }

    /**
    * @Title: 添加封停日志
    * @author 许振杰
    * @date 2022/1/24 0024 15:36
    * @version V1.0
    */
    @Override
    public boolean addclosure(JsClosure closure) {
        return beforeUserMapper.addclosure(closure);
    }

    /**
    * @Title: 添加用户
    * @author 许振杰
    * @date 2022/1/26 0026 20:21
    * @version V1.0
    */
    @Override
    public boolean addBeforeUser(JsBeforeUser beforeUser) {
        return beforeUserMapper.addBeforeUser(beforeUser);
    }

    /**
    * @Title: 根据学号获取userId
    * @author 许振杰
    * @date 2022/1/26 0026 20:22
    * @version V1.0
    */
    @Override
    public List<JsBeforeUser> getUserId(JsBeforeUser beforeUser) {
        return beforeUserMapper.getUserId(beforeUser);
    }

    /**
    * @Title: 添加进思用户
    * @author 许振杰
    * @date 2022/1/26 0026 20:22
    * @version V1.0
    */
    @Override
    public boolean addUserDevelopment(JsUserDevelopment userDevelopment) {
        return beforeUserMapper.addUserDevelopment(userDevelopment);
    }

    /**
    * @Title: 查询优惠卷
    * @author 许振杰
    * @date 2022/1/26 0026 14:07
    * @version V1.0
    */
    @Override
    public List<JsUserCoupon> getAllUserCoupon() {
        return beforeUserMapper.getAllUserCoupon();
    }

    /**
    * @Title: 根据id查询优惠卷发行数量和使用数量
    * @author 许振杰
    * @date 2022/1/26 0026 15:24
    * @version V1.0
    */
    @Override
    public JsUserCoupon getUserCouponById(JsUserCoupon jsUserCoupon) {
        return beforeUserMapper.getUserCouponById(jsUserCoupon);
    }

    /**
    * @Title: 修改优惠卷的发行数量
    * @author 许振杰
    * @date 2022/1/26 0026 15:39
    * @version V1.0
    */
    @Override
    public boolean editUserCouponByUsed(Integer couponId,Integer used) {
        return beforeUserMapper.editUserCouponByUsed(couponId,used);
    }

    /**
    * @Title: 添加优惠卷使用记录
    * @author 许振杰
    * @date 2022/1/26 0026 15:39
    * @version V1.0
    */
    @Override
    public boolean addUserCouponUsed(JsUserCouponUsed userCouponUsed) {
        return beforeUserMapper.addUserCouponUsed(userCouponUsed);
    }

    /**
    * @Title: 进思用户列表
    * @author Administrator
    * @date 2022/1/24 0024 19:52
    * @version V1.0
    */
    @Override
    public List<JsBeforeUser> getUserDevelopment(JsBeforeUser beforeUser) {
        return beforeUserMapper.getUserDevelopment(beforeUser);
    }

    /**
    * @Title: 进思用户列表高级检索
    * @author 许振杰
    * @date 2022/1/24 0024 19:48
    * @version V1.0
    */
    @Override
    public List<JsBeforeUser> userDevelopmentAdvancedRetrieval(JsBeforeUser beforeUser) {
        return beforeUserMapper.userDevelopmentAdvancedRetrieval(beforeUser);
    }

    /**
    * @Title: 非进思用户列表
    * @author 许振杰
    * @date 2022/1/24 0024 21:31
    * @version V1.0
    */
    @Override
    public List<JsBeforeUser> getNotUserDevelopment(JsBeforeUser beforeUser) {
        return beforeUserMapper.getNotUserDevelopment(beforeUser);
    }

    /**
    * @Title: 非进思用户的高级检索
    * @author 许振杰
    * @date 2022/2/21 0021 9:09
    * @version V1.0
    */
    @Override
    public List<JsBeforeUser> notUserDevelopmentAdvancedRetrieval(JsBeforeUser beforeUser) {
        return beforeUserMapper.notUserDevelopmentAdvancedRetrieval(beforeUser);
    }

    /**
    * @Title: 零消费用户列表
    * @author 许振杰
    * @date 2022/1/24 0024 21:31
    * @version V1.0
    */
    @Override
    public List<JsBeforeUser> getNotConsumptionBeforeUser(JsBeforeUser beforeUser) {
        return beforeUserMapper.getNotConsumptionBeforeUser(beforeUser);
    }

    /**
    * @Title: 零消费用户高级检索
    * @author 许振杰
    * @date 2022/2/21 0021 9:09
    * @version V1.0
    */
    @Override
    public List<JsBeforeUser> notConsumptionBeforeUserAdvancedRetrieval(JsBeforeUser beforeUser) {
        return beforeUserMapper.notConsumptionBeforeUserAdvancedRetrieval(beforeUser);
    }

    /**
    * @Title: 修改前端用户信息
    * @author 许振杰
    * @date 2022/2/9 0009 19:33
    * @version V1.0
    */
    @Override
    public boolean editBeforeUser(JsBeforeUser beforeUser) {
        return beforeUserMapper.editBeforeUser(beforeUser);
    }

    /**
    * @Title: 修改进思用户信息
    * @author 许振杰
    * @date 2022/2/9 0009 19:33
    * @version V1.0
    */
    @Override
    public boolean editJinsiUser(JsUserDevelopment userDevelopment) {
        return beforeUserMapper.editJinsiUser(userDevelopment);
    }
}
